<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../../css/aui.css">
    <link rel="stylesheet" type="text/css" href="../../css/aui-slide.css">
    <link rel="stylesheet" type="text/css" href="../../css/api.css">
    <script type="text/javascript" src="../../script/api.js"></script>
</head>
<style>
.time{
    float: right;
    margin: 0.8rem 0rem;
    display: flex;
    /* margin-left: 5rem; */
    flex-direction: row;
    text-align: center;
    flex-wrap: wrap;
    width: 6rem;
    opacity: 0.5;
}

.id{
    float: left;
    font-size: 1rem;
    margin: 1rem 0.5rem;
}
</style>
<body>
    <header class="aui-bar aui-bar-nav aui-bar-pink" style="background-color: #f7911b;height: 3rem;">
        <div class="aui-pull-left aui-btn" style="margin-top: 0.4rem;" onclick="api.closeWin()">
            <span class="aui-iconfont aui-icon-left"></span>
        </div>
        <div class="aui-title" >推荐记录</div>
    </header>
    <section class="aui-content-padded" id="content" style="display: flex;flex-direction: column-reverse;">
        
        <div></div>
        <div></div>
    </section>
</body>
<script type="text/javascript">
    apiready = function() {
       
        var token = $api.getStorage('token');
       
 	var token = {
                token: token
            };
        api.ajax({
            url: 'http://www.mk517.com/webApi/rec_reg.php',
            method: 'post',
            "headers": {
                "Content-Type": "application/json"
            },
            dataType: "json",
            data: {
                body: token
            }
        }, function(ret, err) {
            // alert(JSON.stringify(ret));
            if (ret) {
             for(var i=0;i<=ret.length;i++){

$api.byId('content').innerHTML+='<div style="width: 100%;height: 4rem;background-color: #fff;">'+
            '<span class="id">ID: '+ret[i].source+'</span>'+
            '<div class="time">'+ret[i].addtime+
            '</div>'+
        '</div>'


             }
                
             }else {
                alert(JSON.stringify(err));
            }
        });
    }

</script>

</html>
